<?php
// запрет прямого доступа
defined( '_VALID_MOS' ) or die( 'UnAuthorized Access' );

class Options_html
{
	var $mysql_parameters;
	var $file_parameters;
	
	function check_parameter($field_name,$value){
		global $database;
		$sql = "SELECT $field_name FROM #__security_options WHERE id=1";
		$result=getAssoc($sql);
		if (eregi($value,$result[0][$field_name])){
			return "checked='checked'";
		}
	}
	
	function check_file_parameter($value){
		global $file_parameters;
		if (eregi($value,$file_parameters[0]['file_parameter'])){
			return "checked='checked'";
		}
	}
	
	function get_file_parameter(){
		global $database, $file_parameters;
		$sql = "SELECT file_parameter FROM #__security_options WHERE id=1";
		$file_parameters=getAssoc($sql);
	}
	
	function get_mysql_parameters(){
		global $database, $mysql_parameters;

		$result = getAssoc("SELECT mysql_parameter FROM #__security_options");
		$result = $result[0]['mysql_parameter'];
		$mysql_parameters = explode(" ",$result);
	}
	function check_mysql_parameter($value){
		global $mysql_parameters;

		foreach ($mysql_parameters as $val){
			if($val==$value){
				return "checked='checked'";
			}
		}
	}
	
	function state1($data,$parametr)
	{
		if($parametr=="block_flood_else_1" && ($data['flood_queries_2']>0 || $data['flood_time_2']>0))
		{
			print' checked="checked" ';
		}
		else if($parametr=="block_flood_else_2" && ($data['flood_queries_3']>0 || $data['flood_time_3']>0))
		{
			print' checked="checked" ';
		}
		else if($data[$parametr]==1)
		{
			print' checked="checked" ';
		}
		
	}
	function state0($data,$parametr)
	{
		if($parametr=="block_flood_else_1" && ($data['flood_queries_2']<=0 || $data['flood_time_2']<=0))
		{
			print' checked="checked" ';
		}
		else if($parametr=="block_flood_else_2" && ($data['flood_queries_3']<=0 || $data['flood_time_3']<=0))
		{
			print' checked="checked" ';
		}
		else if($data[$parametr]!=1)
		{
			print' checked="checked" ';
		}
	}
	function show_options()
	{
		global $database,$mosConfig_live_site;
		$data=getAssoc("SELECT * FROM #__security_options");
		//print '<div style="color:#'.$_GET['color'].'"><b>'.$_GET['message'].'</b></div>';

		?>
		<script language='javascript'>
		
		function submitbutton(pressbutton){
			open_all();
			submitform(pressbutton);
		}

		function AntiFloodClick()
		{
			document.getElementById('params[flood_queries_1]').disabled=false;
			document.getElementById('params[flood_time_1]').disabled=false;
			if(document.getElementById('params[block_flood_else_1]1').checked)
			{
				document.getElementById('params[flood_queries_2]').disabled=false;
				document.getElementById('params[flood_time_2]').disabled=false;}
			else
			{
				document.getElementById('params[block_flood_else_1]1').style.color='#999999';
			}
			if(document.getElementById('params[block_flood_else_2]1').checked)
			{
				document.getElementById('params[flood_queries_3]').disabled=false;
				document.getElementById('params[flood_time_3]').disabled=false;
			}
			else
			{
				document.getElementById('params[block_flood_else_2]0').style.color='#999999';
			}
			document.getElementById('params[block_flood_else_1]0').disabled=false;
			document.getElementById('params[block_flood_else_1]1').disabled=false;
			document.getElementById('params[block_flood_else_2]0').disabled=false;
			document.getElementById('params[block_flood_else_2]1').disabled=false;
			document.getElementById('params[flood_parameter0]').disabled=false;
			document.getElementById('params[untiflood]0').style.color='#000000';
		}
		function AntiFloodClick2()
		{
			document.getElementById('params[flood_queries_1]').disabled=true;
			document.getElementById('params[flood_time_1]').disabled=true;
			document.getElementById('params[flood_queries_2]').disabled=true;
			document.getElementById('params[flood_time_2]').disabled=true;
			document.getElementById('params[flood_queries_3]').disabled=true;
			document.getElementById('params[flood_time_3]').disabled=true;
			document.getElementById('params[block_flood_else_1]0').disabled=true;
			document.getElementById('params[block_flood_else_1]1').disabled=true;
			document.getElementById('params[block_flood_else_2]0').disabled=true;
			document.getElementById('params[block_flood_else_2]1').disabled=true;
			document.getElementById('params[flood_parameter0]').disabled=true;
			document.getElementById('params[untiflood]0').style.color='#999999';
		}
		function send_email_close()
		{
			document.getElementById("params[email]").disabled=true;
			document.getElementById("params[send_php_injection]0").disabled=true;
			document.getElementById("params[send_php_injection]1").disabled=true;
			document.getElementById("params[send_mysql_injection]0").disabled=true;
			document.getElementById("params[send_mysql_injection]1").disabled=true;
			document.getElementById("params[send_flood]0").disabled=true;
			document.getElementById("params[send_flood]1").disabled=true;
			//document.getElementById("send_email_table").style.color="#999999";
		}
		function send_email_open()
		{
			document.getElementById("params[email]").disabled=false;
			document.getElementById("params[send_php_injection]0").disabled=false;
			document.getElementById("params[send_php_injection]1").disabled=false;
			document.getElementById("params[send_mysql_injection]0").disabled=false;
			document.getElementById("params[send_mysql_injection]1").disabled=false;
			document.getElementById("params[send_flood]0").disabled=false;
			document.getElementById("params[send_flood]1").disabled=false;
			//document.getElementById("send_email_table").style.color="#000000";
		}
		function mysql_open(){
			document.getElementById("params[mysql_parameter]0").disabled=false;
			document.getElementById("params[mysql_parameter]1").disabled=false;
			document.getElementById("params[mysql_parameter]2").disabled=false;
			document.getElementById("params[mysql_parameter]3").disabled=false;
			document.getElementById("params[mysql_keywords]").disabled=false;
			document.getElementById("params[sql_exeptions]").disabled=false;
			document.getElementById("params[sql_exeptions]").style.color="#000000";
		}
		function mysql_close(){
			document.getElementById("params[mysql_parameter]0").disabled=true;
			document.getElementById("params[mysql_parameter]1").disabled=true;
			document.getElementById("params[mysql_parameter]2").disabled=true;
			document.getElementById("params[mysql_parameter]3").disabled=true;
			document.getElementById("params[mysql_keywords]").disabled=true;
			document.getElementById("params[sql_exeptions]").disabled=true;
			document.getElementById("params[sql_exeptions]").style.color="#999999";
		}
		function file_scan_open(){
			document.getElementById("params[file_parameter]0").disabled=false;
			document.getElementById("params[file_parameter]1").disabled=false;
			document.getElementById('params[file_keywords]').disabled=false;
			document.getElementById("params[php_exeptions]").disabled=false;
			document.getElementById("params[php_exeptions]").style.color="#000000";
		}
		function file_scan_close(){
			document.getElementById("params[file_parameter]0").disabled=true;
			document.getElementById("params[file_parameter]1").disabled=true;
			document.getElementById('params[file_keywords]').disabled=true;
			document.getElementById("params[php_exeptions]").disabled=true;
			document.getElementById("params[php_exeptions]").style.color="#999999";
		}
		function open_all()
		{
			file_scan_open();
			mysql_open();
			send_email_open();
			document.getElementById('params[block_flood_else_1]0').disabled=false;
			document.getElementById('params[block_flood_else_1]1').disabled=false;
			document.getElementById('params[block_flood_else_2]0').disabled=false;
			document.getElementById('params[block_flood_else_2]1').disabled=false;
			document.getElementById('params[flood_parameter0]').disabled=false;
		}
		<?php
		if ($data[0]['mysql_scan']==0){
			?>
			document.getElementById("params[mysql_parameter]0").disabled=true;
			document.getElementById("params[mysql_parameter]1").disabled=true;
			document.getElementById("params[mysql_parameter]2").disabled=true;
			document.getElementById("params[mysql_parameter]3").disabled=true;
			document.getElementById("params[mysql_scan]").disabled=true;
			//document.getElementById("mysql_table").style.color="#999999";
			<?php
		}
		?>
		</script>
		<table width='100%' align='left'>
		<tr>
		<td width='100' align='left' valign='top' style="padding-right:9px;">
		<?php 
		global $mosConfig_absolute_path;
		$path = $mosConfig_absolute_path."/".ADMINISTRATOR_DIRECTORY."/components/com_security/cpanel.html.php";
		if(file_exists($path)) {
			require $path;
			CPanel_html::CPanel();
		}
		?>
		</td>
		</tr>
		<tr>
		<td valign='top'>
		<table class="adminheading">
		<tr>
		<th class="config" ><?php print OPTIONS_HEADER;?></th>
		</tr>
		</table>

		<script language="Javascript" src="<?php  echo $mosConfig_live_site;?>/includes/js/overlib_mini.js"></script>
		<form action="index2.php" method="post" name="adminForm">
		<table class="adminform" border="0">
		<tr>
		<th colspan="2">
		<?php print OPT_MYSQL_TITLE;?>
		
		</th>
		</tr>
		<TR>
		<TD width="250px"> <?php echo OPT_MYSQL_ENABLE?></TD>
		<TD><?php
		if ($data[0]['mysql_scan'] == 1){ 
			print '<input type="radio" name="params[mysql_scan]" value="1" checked="checked" onClick="mysql_open();"/>'. OPT_YES;
			print "<input type='radio' name='params[mysql_scan]' value='0' onClick='mysql_close();' />". OPT_NO;
		} else {  
			print "<input type='radio' name='params[mysql_scan]' value='1' onClick='mysql_open();'/>". OPT_YES;
			print "<input type='radio' name='params[mysql_scan]' value='0' checked='checked' onClick='mysql_close();' />". OPT_NO;
			print "<script>mysql_close();</script>\n";
		} ?></TD>
		</TR>
		<?php Options_html::get_mysql_parameters();?>
		<TR valign="top">
		<TD><span class="editlinktip" onmouseover="return overlib('<?php print OPT_MYSQL_TO_LOG_DEF;?>', CAPTION, 'SQL injection', BELOW, RIGHT);" onmouseout="return nd();" ><?php print OPT_MYSQL_TO_LOG;?></span></TD>
		<TD><input type='checkbox' name='params[mysql_parameter0]' value='0' id='params[mysql_parameter]0'<?php print Options_html::check_mysql_parameter('0');?> /></TD>
		</TR>
		<TR>
		<TD><span class="editlinktip" onmouseover="return overlib('<?php print OPT_MYSQL_SUSPECT_DEF;?>', CAPTION, 'SQL injection', BELOW, RIGHT);" onmouseout="return nd();" ><?php print OPT_MYSQL_SUSPECT;?></span></TD>
		<TD><input type='checkbox' name='params[mysql_parameter1]' value='1' id='params[mysql_parameter]1'<?php print Options_html::check_mysql_parameter('1');?> /></TD>
		</TR>
		<TR>
		<TD><span onmouseover="return overlib('<?php print OPT_MYSQL_BLOCK_IP_DEF;?>', CAPTION, 'SQL injection', BELOW, RIGHT);" onmouseout="return nd();"  class="editlinktip"><?php print OPT_MYSQL_BLOCK_IP;?></span></TD>
		<TD><input type='checkbox' name='params[mysql_parameter2]' value='2' id='params[mysql_parameter]2'<?php print Options_html::check_mysql_parameter('2');?> /></TD>
		</TR>
		<TR>
		<TD><span onmouseover="return overlib('<?php print OPT_MYSQL_BLOCK_LOGIN_DEF;?>', CAPTION, 'SQL injection', BELOW, RIGHT);" onmouseout="return nd();"  class="editlinktip"><?php print OPT_MYSQL_BLOCK_LOGIN;?></span></TD>
		<TD><input type='checkbox' name='params[mysql_parameter3]' value='3' id='params[mysql_parameter]3'<?php print Options_html::check_mysql_parameter('3');?> /></TD>
		</TR>
		<TR>
		<TD valign="top"><span class="editlinktip" onmouseover="return overlib('<?php print OPT_MYSQL_KEYWORDS_DEF ;?>', CAPTION, 'SQL injection', BELOW, RIGHT);" onmouseout="return nd();" ><?php print OPT_MYSQL_KEYWORDS;?></span></TD>
		<TD><textarea cols='60' rows='4' name='params[mysql_keywords]' id='params[mysql_keywords]'><?php $text=$data[0]['mysql_keywords']; print $text;?></textarea>
		</TD>
		</TR>
		<TR>
		<TD><?php echo OPT_EXEPTIONS ?>:</TD>
		<TD>
		<textarea name='params[sql_exeptions]' id='params[sql_exeptions]' cols = '60' rows='4'><?php print $data[0]['sql_exeptions'];?></textarea>
		</TD>
		<?php if ($data[0]['mysql_scan'] == 0){ 
			print "<script>mysql_close();</script>\n";
		}?>
		</TR>
		<TR>
		<Th colspan="2"><?php print OPT_ANTIFLOOD_TITLE;?></Th>
		</TR>
		<TR>
		<TD><?php echo OPT_ANTIFLOOD_ENABLE?></TD>
		<TD><input type="radio" name="params[untiflood]" id="params[untiflood]1" value="1" onClick="AntiFloodClick()" <?php  Options_html::state1($data[0],'untiflood');?> />
		<?php echo OPT_YES?>                
		<input type="radio" name="params[untiflood]" id="params[untiflood]0" value="0" onClick="AntiFloodClick2()" <?php  Options_html::state0($data[0]['untiflood'],'untiflood');?> />
		<?php echo OPT_NO?></TD>
		</TR>
		<TR>
		<TD><span class="editlinktip" onmouseover="return overlib('<?php print OPT_ANTIFLOOD_BLOCK_DEF ?>', CAPTION, 'Antiflood', BELOW, RIGHT);" onmouseout="return nd();" ><?php print OPT_ANTIFLOOD_BLOCK ;?></span></TD>
		<TD><input type='checkbox' name='params[flood_parameter0]' id='params[flood_parameter0]' value='1' style='' <?php print Options_html::check_parameter('flood_parameter','1'); ?> ></TD>
		</TR>
		<TR>
		<TD><span class="editlinktip" onmouseover="return overlib('<?php print OPT_ANTIFLOOD_IF_DEF ?>', CAPTION, 'Antiflood', BELOW, RIGHT);" onmouseout="return nd();" ><?php print OPT_ANTIFLOOD_IF ;?></span></TD>
		<TD><input type=text name="params[flood_queries_1]" id="params[flood_queries_1]" value="<?php  print $data[0]['flood_queries_1'];?>"> <?php print OPT_ANTIFLOOD_OR_MORE ?> <input type=text name="params[flood_time_1]" id="params[flood_time_1]" value="<?php  print $data[0]['flood_time_1'];?>"> <?php print OPT_ANTIFLOOD_SEC?></TD>
		</TR>
		<TR>
		<TD><span class="editlinktip" onmouseover="return overlib('<?php print OPT_ANTIFLOOD_IF_DEF ?>', CAPTION, 'Antiflood', BELOW, RIGHT);" onmouseout="return nd();" ><?php echo OPT_ANTIFLOOD_RULE . " 2"; ?>:</span>
		<input type="radio" name="params[block_flood_else_1]" id="params[block_flood_else_1]0" value="0" onClick="document.getElementById('params[flood_queries_2]').disabled=true;
document.getElementById('params[flood_time_2]').disabled=true;
document.getElementById('params[block_flood_else_1]0').style.color='#999999';" <?php  Options_html::state0($data[0],'block_flood_else_1');?> />
		off
		<input type="radio" name="params[block_flood_else_1]" id="params[block_flood_else_1]1" value="1" onClick="document.getElementById('params[flood_queries_2]').disabled=false;
document.getElementById('params[flood_time_2]').disabled=false;
document.getElementById('params[block_flood_else_1]0').style.color='#000000';" <?php  Options_html::state1($data[0],'block_flood_else_1');?> />
		on</TD>
		<TD>
		<input type=text name="params[flood_queries_2]" id="params[flood_queries_2]" value="<?php print $data[0]['flood_queries_2'];?>" > <?php print OPT_ANTIFLOOD_OR_MORE ?> <input type=text name="params[flood_time_2]" id="params[flood_time_2]" value="<?php print $data[0]['flood_time_2']/60;?>" > <?php print OPT_ANTIFLOOD_MIN ?>
		</TD>
		</TR>
		<TR>
		<TD><span class="editlinktip" onmouseover="return overlib('<?php print OPT_ANTIFLOOD_IF_DEF ?>', CAPTION, 'Antiflood', BELOW, RIGHT);" onmouseout="return nd();" ><?php print OPT_ANTIFLOOD_AND_IF ?></span>
		<input type="radio" name="params[block_flood_else_2]" id="params[block_flood_else_2]0" value="0" onClick="document.getElementById('params[flood_queries_3]').disabled=true;
document.getElementById('params[flood_time_3]').disabled=true;
document.getElementById('params[block_flood_else_2]0').style.color='#999999';" <?php Options_html::state0($data[0],'block_flood_else_2');?> />
		off
		<input type="radio" name="params[block_flood_else_2]" id="params[block_flood_else_2]1" value="1" onClick="document.getElementById('params[flood_queries_3]').disabled=false;
document.getElementById('params[flood_time_3]').disabled=false;
document.getElementById('params[block_flood_else_2]0').style.color='#000000';" <?php Options_html::state1($data[0],'block_flood_else_2');?> />
		on</TD>
		<TD><input type=text name="params[flood_queries_3]" id="params[flood_queries_3]" value="<?php print $data[0]['flood_queries_3'];?>" > <?php print OPT_ANTIFLOOD_OR_MORE ?> <input type=text name="params[flood_time_3]" id="params[flood_time_3]" value="<?php print $data[0]['flood_time_3']/3600;?>"> <?php print OPT_ANTIFLOOD_HOUR ?></TD>
		</TR>
		<TR>
		<TH colspan="2"><?php print OPT_FILE_TITLE ?></TH>
		</TR>
		<TR>
		<TD><?php echo OPT_FILE_ENABLE?></TD>
		<TD>
		<?php 
		if($data[0]['file_scan']==0)
		{
			print"<script language='JavaScript'>document.getElementById('params[file_parameter]0').disabled=true;
				document.getElementById('params[file_parameter]1').disabled=true;
				/*document.getElementById('file_table').style.color='#999999';*/ </script>";
			
			print "<input type='radio' name='params[file_scan]' value='1' onClick='file_scan_open();'/> Yes";
			print "<input type='radio' name='params[file_scan]' value='0' checked='checked' onClick='file_scan_close();' /> No";
		}else{
			print "<input type='radio' name='params[file_scan]' value='1' checked='checked' onClick='file_scan_open();'/> Yes";
			print "<input type='radio' name='params[file_scan]' value='0'  onClick='file_scan_close();' /> No";
		} 
		?>
		</TD>
		</TR>
		<TR>
		<?php Options_html::get_file_parameter();?>
		<TD><span class="editlinktip" onmouseover="return overlib(' <?php print OPT_FILE_BLOCK_LOGIN_DEF ?>', CAPTION, 'MySQL Parameter', BELOW, RIGHT);" onmouseout="return nd();" ><?php print OPT_FILE_BLOCK_LOGIN ?></span></TD>
		<TD><input type='checkbox' name='params[file_parameter0]' value='0' id='params[file_parameter]0'<?php print Options_html::check_file_parameter('0');?> /></TD>
		</TR>
		<TR>
		<TD><span class="editlinktip" onmouseover="return overlib('<?php print OPT_FILE_BLOCK_IP_DEF ?>', CAPTION, 'MySQL Parameter', BELOW, RIGHT);" onmouseout="return nd();" ><?php print OPT_FILE_BLOCK_IP ?></span></TD>
		<TD><input type='checkbox' name='params[file_parameter1]' value='1' id='params[file_parameter]1' <?php print Options_html::check_file_parameter('1');?> /></TD>
		</TR>
		<TR>
		<TD><?php echo OPT_FILE_КEYWORDS?></TD>
		<TD><textarea cols='60' rows='4' name='params[file_keywords]' id='params[file_keywords]'><?php print $data[0]['file_keywords'];?></textarea>
		</TD>
		</TR>      
		<TR>
		<TD><?php echo OPT_EXEPTIONS?>:</TD>
		<TD><textarea name='params[php_exeptions]' id='params[php_exeptions]' cols = '60' rows='4'><?php print $data[0]['php_exeptions']; ?></textarea>
		</TD>
		</TR>
		<TR>
		<TH colspan="2"><?php echo OPT_MAIL_ALERTS?></TH>
		</TR>
		<TR>
		<TD><?php print OPT_MAIL_TITLE;?></TD>
		<TD><input type="radio" name="params[send_email]" id="params[send_email]1" value="1" onClick=" send_email_open();" <?php Options_html::state1($data[0],'send_email');?> />
		Yes
		<input type="radio" name="params[send_email]" id="params[send_email]0" value="0" onClick=" send_email_close();" <?php Options_html::state0($data[0],'send_email');?> />
		No</TD>
		</TR>
		<TR>
		<TD><span class="editlinktip" onmouseover="return overlib('<?php print OPT_MAIL_EMAIL_DEF;?>', CAPTION, 'Email', BELOW, RIGHT);" onmouseout="return nd();" >Email</span></TD>
		<TD><input type=text name="params[email]" id="params[email]" value="<?php print $data[0]['email'];?>" ></TD>
		</TR>
		<TR>
		<TD><span class="editlinktip" onmouseover="return overlib('<?php print OPT_MAIL_DEF;?>', CAPTION, 'Email', BELOW, RIGHT);" onmouseout="return nd();" ><?php print OPT_MAIL_PHP;?></span></TD>
		<TD><input type="radio" name="params[send_php_injection]" id="params[send_php_injection]0" value="0" <?php Options_html::state0($data[0],'send_file_injection');?> />
		No
		<input type="radio" name="params[send_php_injection]" id="params[send_php_injection]1" value="1" <?php Options_html::state1($data[0], 'send_file_injection');?> />
		Yes</TD>
		</TR>
		<TR>
		<TD><span onmouseover="return overlib('<?php print OPT_MAIL_DEF;?>', CAPTION, 'Email', BELOW, RIGHT);" onmouseout="return nd();" ><?php print OPT_MAIL_MYSQL;?></span></TD>
		<TD><input type="radio" name="params[send_mysql_injection]" id="params[send_mysql_injection]0" value="0" <?php Options_html::state0($data[0],'send_mysql_injection');?> />
		No
		<input type="radio" name="params[send_mysql_injection]" id="params[send_mysql_injection]1" value="1" <?php Options_html::state1($data[0],'send_mysql_injection');?> />
		Yes</TD>
		</TR>
		<TR>
		<TD><span class="editlinktip" onmouseover="return overlib('<?php print OPT_MAIL_DEF;?>', CAPTION, 'Email', BELOW, RIGHT);" onmouseout="return nd();" ><?php print OPT_MAIL_FLOOD;?></span></TD>
		<TD><input type="radio" name="params[send_flood]" id="params[send_flood]0" value="0" <?php Options_html::state0($data[0],'send_flood');?> />
		No
		<input type="radio" name="params[send_flood]" id="params[send_flood]1" value="1" <?php Options_html::state1($data[0],'send_flood');?> />
		Yes</TD>
		</TR>
		<TR>
		<TD></TD>
		<TD></TD>
		</TR>
		</table>
		<script language='JavaScript'>
		<?php 
		if(($data[0]['flood_queries_2'] <= 0) || ($data[0]['flood_time_2'] <= 0))
		{?>
			document.getElementById('params[flood_queries_2]').disabled=true;
			document.getElementById('params[flood_time_2]').disabled=true;
			document.getElementById('params[block_flood_else_1]0').style.color='#999999';
			<?php }
		if($data[0]['flood_queries_3']<=0 || $data[0]['flood_time_3']<=0)
		{?>
			document.getElementById('params[flood_queries_3]').disabled=true;
			document.getElementById('params[flood_time_3]').disabled=true;
			document.getElementById('params[block_flood_else_2]0').style.color='#999999';
			<?php }
		if($data[0]['untiflood'] <= 0)
		{?>
			document.getElementById('params[flood_queries_1]').disabled=true;
			document.getElementById('params[flood_time_1]').disabled=true;
			document.getElementById('params[flood_queries_2]').disabled=true;
			document.getElementById('params[flood_time_2]').disabled=true;
			document.getElementById('params[flood_queries_3]').disabled=true;
			document.getElementById('params[flood_time_3]').disabled=true;
			document.getElementById('params[block_flood_else_1]0').disabled=true;
			document.getElementById('params[block_flood_else_1]1').disabled=true;
			document.getElementById('params[block_flood_else_2]0').disabled=true;
			document.getElementById('params[block_flood_else_2]1').disabled=true;
			document.getElementById('params[flood_parameter0]').disabled=true;
			document.getElementById('params[untiflood]0').style.color='#999999';
			<?php  }
		if($data[0]['file_scan'] == 0)
		{?>
			document.getElementById('params[file_parameter]0').disabled=true;
			document.getElementById('params[file_parameter]1').disabled=true;
			document.getElementById('params[file_keywords]').disabled=true;
			// document.getElementById('params[file_table]').style.color='#999999';
			<?php } 
		if($data[0]['send_email']<=0)
		{
			echo "send_email_close();";
		}
		?>
		</script>

		<input type="hidden" name="option" value="com_security" />
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="boxchecked" value="0" />
		<input type="hidden" name="link_boxchecked" value="0" />
		</form>
		<?php 
	}
}